package grape.attend.service.overtime.api;

import grape.attend.service.overtime.po.OvertimeLegal;
import grape.common.service.common.IBaseService;
import grape.common.service.trans.ITransService;

/**
 * <p>
 * 加班法定节假日设置表 服务类
 * </p>
 *
 * @author yangwei
 * @since 2020-05-09
 */
public interface IOvertimeLegalService extends IBaseService<OvertimeLegal>, ITransService<String,String> {

    public static final String trans_name = "overtimeLegalName";
    @Override
    default boolean support(String type){
        return isEqualAny(type,trans_name);
    }

    @Override
    default String trans(String type, String key){
        if (isEqual(type,trans_name)) {
            OvertimeLegal po = getById(key);
            if (po != null) {
                return po.getName();
            }
        }
        return null;
    }
}
